package models

import (
	"gorm.io/gorm"
	"time"
)

// MODEL 基础架构
type MODEL struct {
	ID        uint64         `json:"id" gorm:"primarykey"` // 主键 ID
	CreatedAt time.Time      `json:"created_at"`           // 创建时间
	UpdatedAt time.Time      `json:"updated_at"`           // 更新时间
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`       // 删除时间
}

// User 表
type User struct {
	MODEL
	Name     string `json:"name" db:"name"`
	Password string `json:"password" db:"password"`
	Phone    string `json:"phone" db:"phone"`
	Avatar   string `json:"avatar" db:"avatar"`
}
